package org.langqiao.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class LogHandler implements InvocationHandler{
	
	private Object object;
	
	public LogHandler(){
		
	}
	
	public LogHandler(Object object){
		this.object = object;
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		System.out.println("before you do thing");
		method.invoke(object, args);
		System.out.println("after you do thing");
		return null;
	}
}
